Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add various specs for HashSet, FSet, and iterators (ranges, filter_map, rev) #1313

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lysxia
Copy link
Collaborator

@Lysxia Lysxia commented Jan 7, 2025

  • Also strengthen the spec of filter

Note: the spec for Borrow is required for HashSet::contains

…p, rev)

- Also strengthen the spec of filter

Note: the spec for `Borrow` is required for `HashSet::contains`
@jhjourdan
Copy link
Collaborator

This contains quite a lot of new specifications that need to be discussed.

For example, I am not so sure the spec for double ended iterators is the one we want, because it does not say anything about how the forward and the backward relation interact.

@Lysxia
Copy link
Collaborator Author

Lysxia commented Jan 8, 2025

The current spec for double ended iterators is at least enough for reasoning about simple and common for loops and .collect().

My understanding is that we're not too happy with the iterator specs as a whole (we'd like either better handling of existentials or to rework the specs to make proofs easier) so I'm wary of putting too much work into iterator specs up front. My approach is more to develop just what is needed by examples I come across. It's better to have some specs than none especially for iterators since Creusot can't translate for loops without specs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants